extends layout/default

block content
    .page.page-current
        header.bar.bar-nav
            h1.title #{hotelName}的位置

        include ./include/nav

        .content(data-lgt='#{lgt}',data-lat='#{lat}')
            #allmap

block pageCss
    style.
        #allmap {
            width: 100%;
            height: 100%;;
        }

block pageJs
    script(src="http://api.map.baidu.com/api?v=2.0&ak=CPAetQP606cO6YMsWThgU7fD")

    script.
        // 百度地图API功能
        var map = new BMap.Map("allmap");
        // 用经纬度设置地图中心点
        map.clearOverlays();
        var $content = $('.content')
        var new_point = new BMap.Point($content.data('lgt'),$content.data('lat'));
        var marker = new BMap.Marker(new_point);  // 创建标注
        map.addOverlay(marker);              // 将标注添加到地图中
        map.panTo(new_point);
        map.centerAndZoom(new_point, 11);

        map.enableScrollWheelZoom(true);





